<html>
<head><meta charset="utf-8"><title>About extern &quot;rust-call&quot; and stabilizing Fn traits · t-lang · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/index.html">t-lang</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html">About extern &quot;rust-call&quot; and stabilizing Fn traits</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="230216034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230216034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230216034">(Mar 14 2021 at 05:59)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/213817-t-lang/topic/capture.20clauses/near/230154387">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="271719">Mario Carneiro</span> <a href="#narrow/stream/213817-t-lang/topic/capture.20clauses/near/230143911">said</a>:</p>
<blockquote>
<p>I think it would be much better to just stabilize <code>FnOnce&lt;T&gt;</code> so that people can write callable objects rather than adding so much sugar on closure types</p>
</blockquote>
<p>Can you elaborate a bit more? I don't know exactly what you mean. However, I also think this is unlikely to be something we could fully design and ship in time to be used with the RFC 2229 plans.</p>
</blockquote>
<p>It's a little off topic for this thread, as it doesn't interact directly with closure capture syntax, but for a long time I've been frustrated by the inability to hand-write closures (in case I want to avoid voldemort types, for example), because a necessary component is writing e.g. <code>impl FnOnce&lt;(u64,)&gt; for MyClosure</code> which doesn't compile because... we aren't comfortable with this syntax for <code>FnOnce</code>? Which is bizarre to me, it works fine and has been in use (unstably) since the beginning. I don't think this should be blocked on some future variadic generics RFC (which looks a lot more shaky to me).</p>



<a name="230216168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230216168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230216168">(Mar 14 2021 at 06:01)</a>:</h4>
<p>I won't speak to what the timing of this should be (I don't think it has to fall on an edition boundary but others might correct me), but I don't think there is much design needed besides making the existing trait accessible with the same syntax as all other traits</p>



<a name="230216683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230216683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230216683">(Mar 14 2021 at 06:12)</a>:</h4>
<p><span class="user-mention" data-user-id="271719">@Mario Carneiro</span> I think it's less that we aren't comfortable with the trait syntax, and more that we aren't comfortable with the method and its signature and calling convention.</p>



<a name="230216695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230216695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230216695">(Mar 14 2021 at 06:13)</a>:</h4>
<p>Huh? Isn't there exactly one legal way to write it? The only choice I can see is in the name of the function</p>



<a name="230216862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230216862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230216862">(Mar 14 2021 at 06:17)</a>:</h4>
<p><code>extern "rust-call" </code></p>



<a name="230216908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230216908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230216908">(Mar 14 2021 at 06:18)</a>:</h4>
<p>For the calling convention, I guess that means you would like it to have the same calling convention as an n-ary function even though it only takes one argument. I suppose that can be solved by giving it <code>extern "rust-fnonce-call"</code> calling convention to give you enough leeway to define the calling convention differently from regular functions later</p>



<a name="230228578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230228578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230228578">(Mar 14 2021 at 10:16)</a>:</h4>
<blockquote>
<p>I guess that means you would like it to have the same calling convention as an n-ary function even though it only takes one argument.</p>
</blockquote>
<p>that's exactly what <code>"rust-call"</code> does</p>



<a name="230245628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230245628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Henry-Mantilla <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230245628">(Mar 14 2021 at 15:34)</a>:</h4>
<p>Answering to <span class="user-mention" data-user-id="271719">@Mario Carneiro</span>'s aside (mods: feel free to hoist these comments into their own thread): I also believe some trait or wrapper could be offered in the meantime, for instance:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">pub</span><span class="w"> </span><span class="k">mod</span> <span class="nn">v1</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="sd">/// Coherence wrapper</span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">struct</span> <span class="nc">Closure</span><span class="o">&lt;</span><span class="n">Fields</span><span class="o">&gt;</span><span class="p">(</span><span class="k">pub</span><span class="w"> </span><span class="n">Fields</span><span class="p">);</span><span class="w"></span>

<span class="w">    </span><span class="cp">#[stable...]</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">trait</span><span class="w"> </span><span class="nb">FnOnce</span><span class="o">..</span><span class="p">.</span><span class="w"> </span><span class="cm">/* the current definition, but without extern "rust-call" */</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="cp">#[unstable]</span><span class="w"></span>
<span class="k">pub</span><span class="w"> </span><span class="k">trait</span><span class="w"> </span><span class="nb">FnOnce</span><span class="w"> </span><span class="o">..</span><span class="p">.</span><span class="w"></span>

<span class="k">impl</span><span class="o">&lt;</span><span class="n">F</span><span class="w"> </span>: <span class="nc">v1</span>::<span class="nb">FnOnce</span><span class="o">..</span><span class="p">.</span><span class="o">&gt;</span><span class="w"> </span><span class="nb">FnOnce</span><span class="o">..</span><span class="p">.</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">v1</span>::<span class="n">Closure</span><span class="o">&lt;</span><span class="n">F</span><span class="o">&gt;</span><span class="w"> </span><span class="o">..</span><span class="p">.</span><span class="w"></span>
</code></pre></div>
<p>This a bit ugly and maybe suboptimal (<em>w.r.t.</em> ABIs) but at least it's something usable in stable Rust, and should we take this path, I'm pretty sure the design could be improved (<em>e.g.</em>, is the coherence wrapper really necessary?)</p>
<p>The obvious drawback is the maintenance effort of this <code>v1</code> module staying around forever (potentially deprecated), but we are talking of a dummy newtype wrapper, a trait and a blanket impl tying it to the real trait (if that last part is problematic, we could even envision hard-coding / upper-bounding the arities (up to, say, 6 params), so as to make the blanket impls even easier to write). While long-term Rust is the main priority, present Rust could get some love is all I'm saying <span aria-label="big smile" class="emoji emoji-1f604" role="img" title="big smile">:big_smile:</span></p>



<a name="230246622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230246622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230246622">(Mar 14 2021 at 15:53)</a>:</h4>
<p>What's wrong with exposing <code>extern "rust-call"</code>? I was previously confusing the "rust-call" abi with "Rust", but now I see it solves exactly the problem of directly having polymorphic varargs functions, so why not stabilize it?</p>



<a name="230260706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230260706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rpjohnst <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230260706">(Mar 14 2021 at 18:57)</a>:</h4>
<p>It is kind of an ad-hoc thing that doesn't really mesh with the rest of the type system in an orthogonal/reusable way- for instance it might be preferable to add variadic generics first and then express the Fn traits with that.</p>



<a name="230285077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230285077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230285077">(Mar 15 2021 at 01:40)</a>:</h4>
<p>what about just changing the <code>extern "Rust"</code> ABI for tuples passed by value to always pass them the same as how <code>extern "rust-call"</code> does now? That would allow all <code>Fn*</code> types to have their <code>call</code> methods be stabilized with the Rust ABI.</p>



<a name="230285167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230285167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230285167">(Mar 15 2021 at 01:42)</a>:</h4>
<p>How does that work for pass-by-reference <code>rust-call</code>?</p>



<a name="230285260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230285260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230285260">(Mar 15 2021 at 01:45)</a>:</h4>
<p>(I agree that it seems like it would always be a win to splat out tupled arguments passed by value)</p>



<a name="230298199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230298199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230298199">(Mar 15 2021 at 05:51)</a>:</h4>
<p>I'd expect pass-by-reference (where the argument type is <code>&amp;T</code> or <code>&amp;mut T</code>) to not currently differ between <code>"Rust"</code> and <code>"rust-call"</code>, since afaict the whole point of <code>"rust-call"</code> is to be used by the <code>Fn*</code> traits where the tuple argument is always passed by value.</p>



<a name="230310132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230310132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230310132">(Mar 15 2021 at 08:36)</a>:</h4>
<p><span class="user-mention silent" data-user-id="271719">Mario Carneiro</span> <a href="#narrow/stream/213817-t-lang/topic/capture.20clauses/near/230285260">said</a>:</p>
<blockquote>
<p>(I agree that it seems like it would always be a win to splat out tupled arguments passed by value)</p>
</blockquote>
<p>Nope, it very likely won't. It greatly increases the pressure on argument taking registers, meaning that it is more likely that arguments will be passed on the stack, which requires a move on the caller side in all cases and a move on the callee side if a tuple gets split between registers and the stack. In addition it prevents passing small tuples in one or two registers, even when it would fit. The <code>"Rust"</code> abi tries to pack small types in one or two registers to reduce stack usage during argument passing. The System-V abi for x86_64  does the same.</p>



<a name="230310228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230310228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230310228">(Mar 15 2021 at 08:38)</a>:</h4>
<p><span class="user-mention silent" data-user-id="229517">Jacob Lifshay</span> <a href="#narrow/stream/213817-t-lang/topic/capture.20clauses/near/230298199">said</a>:</p>
<blockquote>
<p>I'd expect pass-by-reference (where the argument type is <code>&amp;T</code> or <code>&amp;mut T</code>) to not currently differ between <code>"Rust"</code> and <code>"rust-call"</code>, since afaict the whole point of <code>"rust-call"</code> is to be used by the <code>Fn*</code> traits where the tuple argument is always passed by value.</p>
</blockquote>
<p>The <code>"rust-call"</code> abi requires the last argument to be a tuple. All arguments before the last are treated the same as they would for the <code>"Rust"</code> abi.</p>



<a name="230375821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230375821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230375821">(Mar 15 2021 at 16:20)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> <a href="#narrow/stream/213817-t-lang/topic/capture.20clauses/near/230310132">said</a>:</p>
<blockquote>
<p>In addition it prevents passing small tuples in one or two registers, even when it would fit.</p>
</blockquote>
<p>Isn't it the opposite? The hypothetical ABI I'm talking about would eagerly promote tupled arguments into multiple arguments, meaning that small tuples would be more likely to be passed in registers than if they were viewed as a struct and passed in memory. This is then weighed against the register pressure cost of lots of arguments, and even the usual x86_64 ABI will put additional arguments on the stack if there are too many. So considering that this happens anyway, such an untupling ABI would just give a bit more flexibility about how to group things when putting values in memory vs in registers.</p>



<a name="230376534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230376534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230376534">(Mar 15 2021 at 16:22)</a>:</h4>
<p><span class="user-mention silent" data-user-id="229517">Jacob Lifshay</span> <a href="#narrow/stream/213817-t-lang/topic/capture.20clauses/near/230298199">said</a>:</p>
<blockquote>
<p>I'd expect pass-by-reference (where the argument type is <code>&amp;T</code> or <code>&amp;mut T</code>) to not currently differ between <code>"Rust"</code> and <code>"rust-call"</code>, since afaict the whole point of <code>"rust-call"</code> is to be used by the <code>Fn*</code> traits where the tuple argument is always passed by value.</p>
</blockquote>
<p>Oh, I confused myself there; the arguments in the tuple are always passed by value, it's just <code>self</code> that has different borrowing modes.</p>



<a name="230376662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230376662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230376662">(Mar 15 2021 at 16:23)</a>:</h4>
<p>I think the point was whether something like <code>(u32, u32)</code> is passed as a single 64-bit aggregate register or split into two separate registers</p>



<a name="230376857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230376857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230376857">(Mar 15 2021 at 16:24)</a>:</h4>
<p>That and the fact that if the tuple is big enough the loads and stores necessary to pass it in registers would hurt performance.</p>



<a name="230376916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230376916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230376916">(Mar 15 2021 at 16:25)</a>:</h4>
<p>I halfway want to just say "do the optimal thing in the given scenario", which should be fine for an unspecified ABI like <code>"Rust"</code>. Is there a reason it needs to be pinned down like the System V ABI?</p>



<a name="230377059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230377059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230377059">(Mar 15 2021 at 16:26)</a>:</h4>
<p>it seems like there are a lot of factors that can come up, many of which are only available post-monomorphization</p>



<a name="230377092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230377092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230377092">(Mar 15 2021 at 16:26)</a>:</h4>
<p>We aren't pinned down to the native C abi. In fact the promotion of values &lt;= 2 registers in size to registers is rust specific. The System V abi only does this in some cases.</p>



<a name="230541463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230541463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Henry-Mantilla <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230541463">(Mar 16 2021 at 16:09)</a>:</h4>
<p>[I think the <em>Musings about the stabilization of Fn traits</em> subthread ought to be split off the current one (although I don't know whom to ping for that)]</p>



<a name="230544439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/About%20extern%20%22rust-call%22%20and%20stabilizing%20Fn%20traits/near/230544439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/About.20extern.20.22rust-call.22.20and.20stabilizing.20Fn.20traits.html#230544439">(Mar 16 2021 at 16:21)</a>:</h4>
<p>Everyone can split topics. If you click on the three dots next to a message there is an option "View source / Edit topic". Only moving topics between streams requires admin permission.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>